This invention relates to an automatic surface inspection system, and more specifically, to such a system especially effective in automatically inspecting a surface for defects such as cracks and dirt.
Cup-shaped vessels such as paper cups are widely used not only as vessels in automatic vending machines but also as vessels for various kinds of foods. In these purposes of use, if the inner surface of such a vessel has a dead insect, hair, oil, etc. adhering thereto, it of course cannot be used as a vessel for foods. Further, even if the adhering material is harmless such as a chip of the vessel itself, the vessel will be apt to be rejected in use. Because of this, there is a very large need for inspection of the inner surface of cup-shaped vessels such as shaped paper cups, and therefore, the vessels have been visually inspected by humans in accordance with need. An experienced human inspector has good, flexible judgment and can comply with a very large number of inspection items with good accuracy in a reasonable inspection time. To the contrary, the accuracy of inspection by human inspectors varies greatly from individual to individual and depends greatly upon subjective factors and his mood or feeling at each occasion. In addition, a human inspector makes more errors as he becomes tired, and he cannot work continuously at a constant speed for a long time. Therefore, automation of such inspection has been desired. If an automatic inspection apparatus is used in place of the visual inspection by humans, it is possible to ensure a constant accuracy and objectivity in the result of inspection, and also, reduction of labor and continuous inspection over long periods are made possible.
However, in automatically inspecting cup-shaped vessels, there will be a problem in processing image information obtained from scanning of the surface of the cup-shaped vessels.
Recent developments in image processing technology have made it possible to detect and discriminate a very small defect on the surface of an object to be inspected. However, not only it is difficult to view the inner surface of a cup-shaped vessel such as a paper cup, but it is also necessary to detect very small defects, for example in the size of 0.1 mm. In addition, since it has been difficult to distinguish such extremely small defects from noise, it has been impossible to perform certain and reliable detection and discrimination. For the purpose of solving this problem, it is necessary not only to increase the resolving power of the surface scanning device such as a television camera, but also to effectively eliminate the noise and to emphasize minute defects so as to give a clear contrast between the defects and other portions. In addition, since the cup-shaped vessel has visible but non-defective portions such as a seamed portion, a printed mark and a convex-concave intentionally given, it is necessary to effectively separate information on these non-defective portions from surface image information of the cup-shaped vessel. Furthermore, when it is necessary to process a very large amount of image information as in the case of processing the image of the inner surface of the cup-shaped vessel, a computer has been ordinarily used heretofore. However, since the processing speed by computer greatly depends on the software in the computer, it can be generally said that if a computer compatible in cost with the surface inspection system is used for processing surface image information, the processing speed will not be fast. That is, use of a computer is not suitable for high speed processing.
Here, taking a paper cup as one example of a cup-shaped vessel, a detailed consideration shows that the paper cup ordinarily has an upper edge, a seam between the side and the bottom, a seam in the side, and also, in some cases, a straw hole formed in the bottom and covered by a peelable metal foil. These seams, edge and hole of the paper cup are detected when the paper cup is imaged. However, since these portions are not defects, they must be distinguished from defects. In such a case, it might be considered to use a deadband treatment, namely, a masking treatment on the surface information portion corresponding to non-defective portions such as seams and the like. In order to surely perform the masking treatment even if there is inaccuracy in position of the paper cup or displacement of the surface scanning device, the mask has to be enlarged to some extent to cover the non-defective portions. However, if this is so done, not only the portion to be masked but also real defective portions may be actually masked, so that the real defective portions cannot be detected. Such surface inspection is not sufficiently reliable. In other words, if there is a portion to be masked in the surface to be inspected, since there has heretofore inevitably been generated a portion which is not subjected to the defect detection because of the masking treatment, perfect defect detection has been impossible.
If a paper cup is positioned against the surface scanning device so that the seam in the side of the paper cup is directed along the main scanning direction of the surface detecting device, the upper edge and the side-bottom seam will be perpendicular to the main scanning direction. However, there has heretofore been no method which both can effectively mask a portion to be masked along the main scanning direction and another portion to be masked along the direction perpendicular to the main scanning direction, and can also perform the defect detection for the whole of the surface to be inspected so that there is no remaining portion not subjected to defect detection, thereby to completely detect any defect.
In addition, in order to perform selective masking of the image information obtained, a reference axis is necessary for collating a mask pattern with the image information obtained. But, if image scanning for surface inspection is started for the whole of a paper cup after there is detected what can be used as a reference axis in the surface of the paper cup, a long time is required for surface scanning of each paper cup. This is not suitable for high speed inspection.